﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <title>{$goods.goods_name}-{$tpshop_config['shop_info_store_title']}</title>
    <link rel="stylesheet" href="__STATIC__/css/frame.css" type="text/css"/>
    <link rel="stylesheet" href="__STATIC__/css/common.css" type="text/css"/>
    <link rel="stylesheet" href="__STATIC__/css/product.css" type="text/css"/>

    <script type="text/javascript" src="__STATIC__/js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="__STATIC__/js/jquery-form.js"></script>
    <script type="text/javascript" src="__STATIC__/js/frame.js"></script>
    <script type="text/javascript" src="__STATIC__/js/application.js"></script>
    <script type="text/javascript" src="__STATIC__/js/ajax.js"></script>
    <script type="text/javascript" src="__PUBLIC__/js/global.js"></script>
    <script src="__PUBLIC__/js/pc_common.js"></script>
    <script src="__PUBLIC__/js/layer/layer.js"></script><
    <script>
        var currencyValue = '¥';
    </script>
    <!--[if IE 6]>
    <script type="text/javascript" src="__STATIC__/js/dd_belatedpng.js"></script>
    <script type="text/javascript">
        DD_belatedPNG.fix('.headerMid h2 img');
    </script>
    <![endif]-->
    <!-- 色系CSS -->
    <!-- 色系CSS -->
    <style>
        /*通用颜色设置*/
        .main-bg-color {
            background-color: #f4f4f4
        }
        .border-color {
            border-color: #eeeeee
        }
        .header-footer-bg-color {
            background-color: #ffffff
        }
        /*字体颜色设置*/
        .header-f-color {
            color: #7f858a
        }

        .main-f-color {
            color: #666666
        }

        .footer-f-color {
            color: #666666
        }

        .link-f-color a:link, .link-f-color a:visited, .link-f-color a:hover {
            color: #666666
        }

        .link-f-color-hover a:hover {
            color: #e5004f
        }

        /*按钮链接颜色设置*/
        .btn-bg-color {
            background-color: #e5004f
        }

        .btn-f-color, a.btn-f-color:link, a.btn-f-color:visited, a.btn-f-color:hover {
            color: #ffffff
        }

        /*导航及购物车颜色设置*/
        .main-nav-bg-color {
            background-color: #222222
        }

        .main-nav-bg-color-s, .main-nav-bg-color-s a {
            background-color: #e5004f
        }

        .main-nav-f-color, .main-nav-f-color a:link, .main-nav-f-color a:visited, .main-nav-f-color a:hover {
            color: #ffffff;
        }

        .main-nav-f-color .item-sub-box a:link, .main-nav-f-color .item-sub-box a:visited {
            color: #666;
        }

        .main-nav-f-color .item-sub-box a:hover {
            color: #e5004f;
        }

        .main-nav-f-color-s, .main-nav-f-color-s a:link, .main-nav-f-color-s a:visited, .main-nav-f-color-s a:hover {
            color: #ffffff
        }

        .nav-bg-color {
            background-color: #222222
        }

        .nav-border-color {
            border-color: #222222
        }

        .nav-f-color, .nav-f-color a:link, .nav-f-color a:visited, .nav-f-color a:hover {
            color: #ffffff;
        }

        .nav-bg-color-s, .nav-bg-color-s a, .bannerDiv .slideBox .hd ul li.on {
            background-color: #e5004f
        }

        .nav-bg-color-s .item-sub-box a {
            background-color: #fff
        }

        .nav-border-color-s {
            border-color: #e5004f
        }

        .nav-f-color-s, .nav-f-color-s a:link, .nav-f-color-s a:visited, .nav-f-color-s a:hover {
            color: #ffffff
        }

        .nav-bg-color-hover a:hover {
            background-color: #e5004f
        }

        .nav-bg-color-hover .item-sub-box a:hover {
            background-color: #fff
        }

        .nav-f-color-hover a:hover {
            color: #ffffff
        }

        .bannerDiv .slideBox .hd ul li {
            background-color: #fff
        }
    </style>
    <!-- End 色系CSS -->
</head>

<body style="overflow-x:hidden;">
<include file="Public/header_base" />
    <div class="clear"></div>
    <div id="pgbody" class="main-bg-color main-f-color link-f-color link-f-color-hover">
        <include file="Public/header_nav" />
        <div class="container">
            <ul class="pathNav">
                <li>您现在的位置：<a href="/">首页</a></li>
                <foreach name="navigate_goods" key="k" item="v">
                    <li>&gt;</li>
                    <li><a href="{:U('/Home/Goods/goodsList',array('id'=>$k))}">{$v}</a></li>
                </foreach>
                <li>&gt;</li>
                <li><a href="javascript:void(0)">{$goods.goods_name}...</a></li>
            </ul>
            <div class="clear"></div>
            <div class="detailMid bg-white clearfix">
                <div class="detailL fl">
                    <div class="bigImg">
                        <div class="jqzoom" id="spec-n1">
                            <img class="scrollLoading"
                                 data-url="{$goods.goods_id|goods_thum_images=400,400}"
                                 jqimg="{$goods.goods_id|goods_thum_images=800,800}"
                                 width="420" height="420">
                        </div>
                        <div class="smallDiv">
                            <div id="spec-left" class="leftBtn fl"><img class="scrollLoading"
                                                                        data-url="__STATIC__/images/img_btnL.gif"/>
                            </div>
                            <div id="spec-right" class="RightBtn fr"><img class="scrollLoading"
                                                                          data-url="__STATIC__/images/img_btnR.gif"/>
                            </div>
                            <div class="smallImgList fl" id="spec-list">
                                <ul>
                                    <foreach name="goods_images_list" item="v" key="k" >
                                    <li onmouseover="showImg(this, '{$v|get_sub_images=$v[goods_id],400,400}', '{$v|get_sub_images=$v[goods_id],800,800}')">
                                        <img src="{$v|get_sub_images=$v[goods_id],60,60}"/></li>
                                    </foreach>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="detailR fontS14 fr">
                    <h1 class="proName">{$goods.goods_name}</h1>

                    <div class="clear"></div>

                    <!-- 团购 -->
                    <div id="ProductPriceDiv">
                        <div class="clear"></div>
                        <div class="tuan-bom">
                            <!-- 抢券 -->
                            <div class="quan-box">
                                <a href="javascript:;"
                                   onclick="$('#promotionActiveID').val('1452');openInfoWindow('product', 'checkUserZgWindow');"><span>领取优惠券<i>¥</i></span></a>

                                <div class="clear"></div>
                            </div>
                            <!-- End 抢券 -->
                            <input type="hidden" name="promotionActiveID" id="promotionActiveID" value="">

                            <div>
                                <span class="proNLeft fl">商&nbsp;&nbsp;城&nbsp;&nbsp;价：</span>
                                <strong class="proNR price red-color fontS18 fl"><i class="fontFArial"
                                                                                    id="productPrice">¥{$goods.shop_price}</i></strong>
                            </div>
                            <div class="clear"></div>
                            <div>
                                <if condition="($goods['shop_price'] egt ($goods['exchange_integral']/$point_rate)) AND $goods['exchange_integral'] gt 0">
                                <span class="proNLeft fl">促销信息：</span>
                                <span class="proNR fl" style="font-size:13px;color:red">¥<em class="proNi">积分</em>{$goods['shop_price']-$goods['exchange_integral']/$point_rate}+{$goods['exchange_integral']}积分</span>
                                </if>
                            </div>
                            <div class="clear"></div>
                        </div>
                        <div class="clear"></div>
                        <div class="pt10">
                            <span class="proNLeft fl">商品运费：</span>
		<span class="proNR fl">
			¥0.01
			（<font class="red-color">订单金额满500.00元免运费</font>）
			</span>
                        </div>
                    </div>
                    <div class="clear"></div>
                    <!-- End 团购 -->

                    <div>
                        <ul class="gwb-panel">
                            <li class="gwb-item">
                                <div class="gwb-indcon">
                                    <span class="gwb-label">月销量</span>
                                    <span class="gwb-count">{$goods.sales_sum}</span>
                                </div>
                            </li>
                            <li class="gwb-item">
                                <div class="gwb-indcon">
                                    <span class="gwb-label">评论数</span>
                                    <span class="gwb-count"><a style="color: #c40000" href="#detailBom"
                                                               onclick="$('#opt_2').addClass('on nav-bg-color-s nav-f-color-s').siblings().removeClass('on nav-bg-color-s nav-f-color-s');showPro(2)">{$goods.comment_count}</a></span>
                                </div>
                            </li>
                            <li class="gwb-item">
                                <div class="gwb-indcon">
                                    <span class="gwb-label">库存量</span>
                                    <span class="gwb-count" id="curStock">{$goods.store_count}</span>
                                </div>
                            </li>
                            <li class="gwb-item">
                                <div class="gwb-indcon">
                                    <span class="gwb-label">赠送积分</span>
                                    <span class="gwb-count" id="givePoint_span">{$goods.give_integral}</span>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <div class="clear"></div>
                    <!-- 供应商信息 -->
                    <!-- 供应商信息 -->

                    <div class="pt10 productSKU" id="productSKU">
                        <dl class="">
                            <dt class="pt8">选择颜色：</dt>
                            <dd class="">
                                <div id="pv_1000:1001" class="item" onclick="selectpv('1000', '1001');">
                                    <!-- saleOut selected -->
                                    <b></b>
                                    <a href="javascript:;">
                                        <span>蓝色</span>
                                    </a>
                                </div>
                            </dd>
                        </dl>
                        <div class="clear"></div>
                        <input type="hidden" name="seleted_pv_1000" id="seleted_pv_1000" value=""/>
                        <dl class="mt10">
                            <dt class="pt8">选择尺码：</dt>
                            <dd class="sel fontS12">
                                <div id="pv_1001:1004" class="item" onclick="selectpv('1001', '1004');">
                                    <!-- saleOut selected -->
                                    <b></b>
                                    <a href="javascript:;">
                                        <span>S</span>
                                    </a>
                                </div>
                                <div id="pv_1001:1005" class="item" onclick="selectpv('1001', '1005');">
                                    <!-- saleOut selected -->
                                    <b></b>
                                    <a href="javascript:;">
                                        <span>M</span>
                                    </a>
                                </div>
                                <div id="pv_1001:1006" class="item" onclick="selectpv('1001', '1006');">
                                    <!-- saleOut selected -->
                                    <b></b>
                                    <a href="javascript:;">
                                        <span>L</span>
                                    </a>
                                </div>
                                <div id="pv_1001:1024" class="item" onclick="selectpv('1001', '1024');">
                                    <!-- saleOut selected -->
                                    <b></b>
                                    <a href="javascript:;">
                                        <span>XL</span>
                                    </a>
                                </div>
                            </dd>
                        </dl>
                        <div class="clear"></div>
                        <input type="hidden" name="seleted_pv_1001" id="seleted_pv_1001" value=""/>
                        <!-- End 选择颜色 -->
                        <input type="hidden" id="pids" name="pids" value="1000,1001"/>
                    </div>
                    <!-- End 选择尺码 -->
                    <div class="clear"></div>
                    <!-- 购物车 -->
                    <div class="buy-div fl">
                        <div class="buy-num fl">
                            <div class="fl">
                                <input id="number" name="number" class="buy-num-input" type="input" value="1" min="1"
                                       max="99" step="1" maxlength="3"/>
                            </div>
                        </div>
                        <div class="fl">
                            <a id="addNum" class="p-num-add" href="javascript:;"></a>
                            <a id="cutNum" class="p-num-cut" href="javascript:;"></a>
                        </div>
                        <script>
                            $("#addNum").click(function () {
                                var valueT = document.getElementById("number").value;
                                if (parseInt(valueT) < 1 || parseInt(valueT) > 99) {
                                    document.getElementById("number").value = 1;
                                } else {
                                    valueT = parseInt(valueT) + 1;
                                    if (valueT > 99) {
                                        return false;
                                    } else {
                                        document.getElementById("number").value = valueT;
                                    }
                                }
                            })
                            $("#cutNum").click(function () {
                                var valueT = document.getElementById("number").value;
                                if (parseInt(valueT) < 1 || parseInt(valueT) > 99) {
                                    document.getElementById("number").value = 1;
                                } else {
                                    valueT = parseInt(document.getElementById("number").value) - 1;
                                    if (valueT > 99 || valueT == 0) {
                                        document.getElementById("number").value = 1;
                                        return false;
                                    } else {
                                        document.getElementById("number").value = valueT;
                                    }
                                }
                            })
                        </script>
                    </div>

                    <div class="cart-btn mt15 fl">
                        <a id="addCart_a" class="btn-bg-color btn-f-color fontS16"
                           href="javascript:void(0)"
                           onclick="if(checkSku()){doAction('cart', 'addCartProduct')}">加入购物车</a>
                        <a id="addCart_disable_a" class="btn-bg-color btn-f-color fontS16" href="javascript:void(0)"
                           onclick="alert('该商品已售空')" style="background-color: #666;cursor: not-allowed;display: none">加入购物车</a>
                        <!--  无库存  灰色按钮 -->
                    </div>

                    <div class="cart-btn mt15 fl">
                        <a id="addCart_f" class="btn-bg-color btn-f-color fontS16 quick-buy-btn"
                           style="border-color: #e5004f;color: #e5004f;" href="javascript:void(0)"
                           onclick="if(checkSku()){doAction('cart', 'gotoOrderNormal')}">立即购买</a>
                        <a id="addCart_disable_f" class="btn-bg-color btn-f-color fontS16 quick-buy-btn"
                           href="javascript:void(0)" onclick="alert('该商品已售空')"
                           style="border-color: #666;color: #666;background-color: #fff;cursor: not-allowed;display: none">立即购买</a>
                        <!--  无库存  灰色按钮 -->
                    </div>

                    <div class="clear"></div>
                    <div class="productShare" style="margin-top: 0px">
                        <label class="frame_msg fl" id="msg_msg_number" style="display: none;"></label>
                        <label class="frame_msg fl" id="msg_msg_buy" style="display: none;"></label>
                        <label class="frame_msg fl" id="msg_msg_point" style="display: none;"></label>
                    </div>
                    <!-- End 购物车 -->

                    <div class="clear"></div>
                    <!-- 分享 -->
                    <div class="productShare" style="margin-top: 0px">
                        <div class="fl">
                            <a href="javascript:;" id="collectLink"
                               class="collect"><span >收藏</span></a>
                        </div>
                        <div class="fl">
                            <div class="fl">分享至：</div>
                            <div class="bdsharebuttonbox shareWrap fl">
                                <a href="#" class="bds_tsina sina2" data-cmd="tsina"></a>
                                <a href="#" class="bds_tqq2 tq2" data-cmd="tqq"></a>
                                <a href="#" class="bds_qzone qz2" data-cmd="qzone"></a>
                                <a href="#" class="bds_weixin wx2" data-cmd="weixin"></a>
                                <a href="#" class="bds_renren rr2" data-cmd="renren"></a>
                                <a href="#" class="bds_more more2" data-cmd="more"></a>
                            </div>
                        </div>
                    </div>
                    <!-- End 分享 -->
                    <div class="clear"></div>
                    <!--<div class="pt50 productSKU2">-->
                        <!--<dl class="mt10">-->
                            <!--<dt style="height: 50px;padding-top: 6px">线下门店：</dt>-->
                            <!--<dd class="sel fontS12" style="overflow:visible">-->
                                <!--<span class="fl"><select id='shopID' name='shopID' class=''-->
                                                         <!--onchange=selectOnchange(this)>-->
                                    <!--<option value='1005'>太阳宫店</option>-->
                                    <!--<option value='1006'>西直门店</option>-->
                                <!--</select></span>-->
                                <!--&nbsp;&nbsp;<span pid="replceA" class="replceA pl10 fl"><a href="/shop/1005.html"-->
                                                                                           <!--target='_blank'>查看地图</a></span>-->
                            <!--</dd>-->
                        <!--</dl>-->
                    <!--</div>-->
                </div>
            </div>
            <div class="clear"></div>
            <div class="pt10">
                <!-- 商品介绍、商品评价、商品咨询、购买须知 -->
                <div class="detailBomL fl">
                    <div id="detailBom" class="sortNav detail-sort-nav detailBomNav clearfix">
                        <ul class="sortList fl">
                            <li class="on nav-bg-color-s nav-f-color-s"><a href="javascript:;"
                                                                           onclick="showPro(1)">商品介绍</a></li>
                            <li id="opt_2"><a href="javascript:;" onclick="showPro(2)">商品评价</a></li>
                            <li><a href="javascript:;" onclick="showPro(3)">商品咨询</a></li>
                            <li><a href="javascript:;" onclick="showPro(4)">购物流程</a></li>
                        </ul>
                        <div class="detailNavAddCart fr">
                            <a id="addCart_a2" class="butTop btn-bg-color btn-f-color fontS16" href="javascript:void(0)"
                               onclick="if(checkSku()){doAction('cart', 'addCartProduct')}">加入购物车</a>

                            <div class="buyBom">
                                <img class="fl scrollLoading"
                                     data-url="{$goods.goods_id|goods_thum_images=400,400}"
                                     style="width: 66px"/>

                                <div class="buyBomInfo fr">
                                    <p class="p1"><a href="" title="{$goods.goods_name}">{$goods.goods_name}</a></p>
                                    <p class="red-color">
                                        商城价：¥<span class="fontFArail">
							{$goods.shop_price}</span></p>
                                </div>
                            </div>
                        </div>
                        <div class="moblieDiv fr">
                            <div class="moblie">手机下单更便捷</div>
                            <div class="qrCode">
                                <img id="productQRCode" width="130" height="130" alt="手机扫描二位码，下单购物更便捷" src=""/>
                            </div>
                        </div>
                    </div>
                    <div class="detailInfo bg-white">
                        <div class="detailInfoLi pt15" id="pro_div_1">
                            <h2 class="detailInrH2"><i>商品参数</i><span>Product Parameters</span></h2>

                            <div class="pt15">
                                <p class="InrP evenInr">
                                    <span title="适用年龄：">品牌：{$goods['brand_name']}</span>
                                </p>
                            </div>
                            <div class="pt15 sys_editorContent">
                                <html>
                                <head></head>
                                <body>
                                <p>&nbsp;</p>

                                {$goods.goods_content|htmlspecialchars_decode}
                                <p>&nbsp;</p>

                                <p><br/></p>
                                </body>
                                </html>
                            </div>
                        </div>
                        <div class="clear"></div>
                        <div class="detailInfoLi pt15" id="pro_div_2">
                            <h2 class="detailInrH2"><i>用户评论</i><span>USER COMMENTS</span></h2>

                            <div class="pt15" id="productCommentInfo">
                                <ul class="zixunList">
                                    <li>
                                        <p class="zixunNone">暂无此款商品相关的评论</p>
                                    </li>
                                </ul>
                                <div class="clear"></div>
                            </div>
                            <script>
                                $(document).ready(function(){
                                    commentType = 1; // 评论类型
                                    ajaxComment(1,1);// ajax 加载评价列表
                                });
                                // 用ajax分页显示评论
                                function ajaxComment(commentType,page){
                                    $.ajax({
                                        type : "GET",
                                        url:"/index.php?m=Home&c=Goods&a=ajaxComment&goods_id={$goods['goods_id']}&commentType="+commentType+"&p="+page,//+tab,
                                        success: function(data){
                                            $("#productCommentInfo").html('');
                                            $("#productCommentInfo").append(data);
                                        }
                                    });
                                }
                                //关闭按钮背景定位
                                $('.askTitle .shaidan-img .close-btn').hover(function () {
                                    $(this).css('background-position', '-4px -30px');
                                }, function () {
                                    $(this).css('background-position', '-4px 4px');
                                });

                                //左右按钮背景定位
                                $('.askTitle .shaidan-img button').hover(function () {
                                    if ($(this).hasClass('btn-l')) {
                                        $(this).css('background-position', '0 -126px');
                                    } else {
                                        $(this).css('background-position', '0 -244px');
                                    }
                                }, function () {
                                    if ($(this).hasClass('btn-l')) {
                                        $(this).css('background-position', '0 -68px');
                                    } else {
                                        $(this).css('background-position', '0 -186px');
                                    }
                                });

                                //关闭按钮
                                $('.askTitle .shaidan-img .close-btn').click(function () {
                                    $(this).parent().hide();
                                });
                                //本地缓存
                                var is = localStorage;
                                var liL = 0;
                                var liW = 0;
                                var $Big = '';
                                var $Small = '';
                                var index = 0;
                                //给图片添加点击事件
                                $('.askTitle .askL .smallImg .shaidan').click(function () {
                                    $(this).addClass('cur').siblings().removeClass('cur');
                                    $('.askTitle .shaidan-img#c_' + $(this).attr("pid")).show();
                                    $Big = $(this).parents(".askTitle").children(".shaidan-img");
                                    $Small = $(this).parents('.smallImg');
                                    $UL = $Big.find('ul');
                                    //大图个数
                                    liL = $UL.find("li").length;
                                    liW = $UL.find("li").width();
                                    //ul宽度
                                    $UL.width(liW * liL);

                                    //将小图的src属性赋给大图
                                    // for(var i = 0;i < $('.askTitle .askL .shaidan').length; i++){
                                    // $('.askTitle .shaidan-img ul li').eq(i).children('img').attr('src',$('.askTitle .askL .shaidan').eq(i).children('img')[0].src);
                                    // }

                                    //清除缓存
                                    //is.removeItem("index");

                                    index = $(this).index();

                                    //把小图的索引值添加到缓存里面去
                                    //is.setItem("index",index);

                                    $(this).parent().parent().siblings('.shaidan-img#c_' + $(this).attr("pid")).children('div').children('ul').stop().animate({'left': -index * liW}, 500);

                                    if (liL == 1) {
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-l').hide();
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-r').hide();
                                    } else if (index == 0) {
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-l').hide();
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-r').show();
                                    } else if (liL - 1 == index) {
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-l').show();
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-r').hide();
                                    } else {
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-l').show();
                                        $('.askTitle .shaidan-img#c_' + $(this).attr("pid") + ' .btn-r').show();
                                    }
                                });


                                //给左右按钮添加点击事件
                                slidebtn()
                                function slidebtn() {
                                    //计算li的宽和长度
                                    //liW = $('.askTitle .shaidan-img ul li').width();
                                    //liL = $('.askTitle .shaidan-img ul li').length;

                                    var num = 0;
                                    if (liL == 1) {
                                        $Big.find('.btn-l').hide();
                                        $Big.find('.btn-r').hide();
                                    } else {
                                        //右按钮
                                        $('button.btn-r').click(function () {
                                            //当点击左右按钮时获取缓存里小图的index值
                                            var index = $(this).parents('div.askTitle').find('div.smallImg').find("a.cur").index();
                                            var L = index + 1;
                                            alert(index);
                                            //if(index != null){
                                            //}
                                            if (liL - 1 > L) {
                                                $(this).show();
                                                $(this).siblings('button').show();
                                            } else {
                                                $(this).hide();
                                                $(this).siblings('button').show();
                                            }
                                            ;
                                            $(this).parents('div.shaidan-img').find('ul').stop().animate({'left': -L * liW}, 500);
                                            $(this).parents('div.askTitle').find('div.smallImg').find('a').eq(L).addClass('cur').siblings('a').removeClass('cur');
                                            //is.removeItem("index");

                                        });
                                        //左按钮
                                        $('button.btn-l').click(function () {
                                            //当点击左右按钮时获取缓存里小图的index值
                                            var index = $(this).parents('div.askTitle').find('div.smallImg').find("a.cur").index();
                                            var R = index - 1;
                                            alert(index);
                                            if (R == 0) {
                                                $(this).hide();
                                                $(this).siblings('button').show();
                                            } else {
                                                $(this).show();
                                                $(this).siblings('button').show();
                                            }
                                            ;
                                            $(this).parents('div.shaidan-img').find('ul').stop().animate({'left': -R * liW}, 500);
                                            $(this).parents('div.askTitle').find('div.smallImg').find('a').eq(R).addClass('cur').siblings('a').removeClass('cur');
                                            //is.removeItem("index");
                                        })

                                    }
                                    ;
                                }
                            </script>
                        </div>
                        <div class="clear"></div>
                        <div class="detailInfoLi pt15" id="pro_div_3">
                            <h2 class="detailInrH2"><i>商品咨询</i><span>USERS ADVISORY</span></h2>

                            <div class="pt15">
                                <div class="zixunTop">
                                    <span>温馨提示：商品咨询及回复具有时效性，相关问答信息仅供参考！</span>

                                    <div class="clear"></div>
                                </div>
                                <div id="productConsultInfo" style="display: block;">

                                    <div class="commodity-num" id="ajax_consult_return">
                                        <!--ajax return-->
                                    </div>
                                    <script>
                                        ajaxConsult(0,1);// ajax 加载咨询列表
                                        function ajaxConsult(consult_type, page) {
                                            $.ajax({
                                                type: "GET",
                                                url: "/index.php?m=Home&c=Goods&a=ajax_consult&goods_id={$goods['goods_id']}&consult_type=" + consult_type + "&p=" + page,//+tab,
                                                success: function (data) {
                                                    $("#ajax_consult_return").html('');
                                                    $("#ajax_consult_return").append(data);
                                                }
                                            });
                                        }
                                    </script>

                                    <div class="clear"></div>
                                    <input type="hidden" id="consuPageIndex" name="consuPageIndex" value="1"/>
                                    <input type="hidden" id="consuPageCount" name="consuPageCount" value="1"/>
                                </div>
                                <div class="clear"></div>
                                <form action="{:U('Home/Goods/goodsConsult')}" method="post" id="form_consult" name="form_consult" onSubmit="return check_form_consult(this);">
                                    <input type="hidden" name="consult_type" value="1" />
                                    <input type="hidden" name="goods_id" value="{$goods.goods_id}" />
                                <div class="zixunBom">
                                    <div class="zixunBomLi">
                                        <table cellpadding="0" cellspacing="0" width="100%">
                                            <tr height="15">
                                                <td width="20%" align="right">网&nbsp;名：</td>
                                                <td width="20%" align="left"><input type="text" name="username" id="username" placeholder="请输入网名" /></td>
                                            </tr>
                                            <tr>
                                                <td width="20%" align="right">咨询内容：</td>
                                                <td width="*" align="left">
                                                    <textarea class="zixunText" id="consultationContent"
                                                              name="content"
                                                              onkeyup="javascript:if (this.value.length > 500) this.value = this.value.substring(0, 500)"></textarea>
                                                </td>
                                            </tr>
                                            <tr height="15"></tr>
                                            <tr>
                                                <td width="20%" align="right">验证码：</td>
                                                <td width="20%" align="left" class="grey-color">
                                                    <input  type="text" name="verify_code" placeholder="不区分大小写"/>
                                                    <img  id="verify_code" width="80" height="40" src="/index.php?m=Home&c=Index&a=verify&type=consult&fontSize=20&length=4" />
                                                    <a><img  src="__STATIC__/images/chg_image.png"  onclick="verify(this)" /></a>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td></td>
                                                <td>
                                                    <input class="commitBtn btn-bg-color btn-f-color" style="border:none;" type="submit" value="提交">
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                </div>
                                </form>
                            </div>
                        </div>
                        <div class="detailInfoLi pt15" id="pro_div_4" style="display: none">
                            <h2 class="detailInrH2"><i>购物流程</i></h2>

                            <div class="pt15">
                                <p><span style="font-size: 12px;"></span><img style="width: 800px; height: 755px;"
                                                                              src="images/77321444296699179.jpg"
                                                                              title="2015-10-08T09-27-14.909Z.jpg"
                                                                              border="0" height="755" hspace="0"
                                                                              vspace="0" width="800"/></p></div>
                        </div>
                    </div>
                </div>
                <!-- End 商品介绍、商品评价、商品咨询、购买须知 -->
                <!-- 人气推荐 -->
                <div class="detailBomR fr">
                    <div class="sortNav detailBomNav detailBomRNav detailHot nav-bg-color nav-f-color clearfix">
                        相关商品
                    </div>
                    <tpshop sql="select * from `__PREFIX__goods` where is_recommend = 1 order by goods_id desc limit 5" item="v" key="k" >
                    <ul class="tujian-list bg-white">
                        <li>
                            <a target="_blank" href="{:U('Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}">
                                <img class="scrollLoading" data-url="{$v.goods_id|goods_thum_images=60,60}" style="width: 150px;height: 150px"/>
                            </a>
                            <p class="tuijian-name">
                                <a target="_blank" href="{:U('Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}" title="{$v.goods_name}">{$v.goods_name}</a>
                            </p>
                            <p class="tuijian-price">
                                <strong class="red-color" style="float: left;">¥<i
                                        class="fontFArial">{$v.shop_price}</i></strong>
                            </p>
                        </li>
                    </ul>
                    </tpshop>
                </div>
                <!-- End 人气推荐 -->
                <div class="clear"></div>
            </div>
        </div>
        <script src="__STATIC__/js/jquery.foucs.js" type="text/javascript"></script>
        <script src="__STATIC__/js/jquery.scrollloading.js" type="text/javascript"></script>

        <script>
            $.foucs({direction: 'right'});
            $(function () {
                $(".scrollLoading").scrollLoading();
                $(".edui-faked-video").scrollLoading();
            });
        </script>

        <script src="__STATIC__/js/webdm.js" type="text/javascript" charset="gb2312"></script>
        <script src="__STATIC__/js/sku.js" type="text/javascript"></script>

        <script type="text/javascript">
            $(function () {
                var defualtStock = "1000:1001,1001:1004";
                if (defualtStock != "") {
                    var split1 = defualtStock.split(",");
                    for (var i = 0; i < split1.length; i++) {
                        var splitStr = split1[i];
                        var split2 = splitStr.split(":");
                        selectpv(split2[0], split2[1]);
                    }
                } else {
                    selectSkuID(82995);
                }
            });
            (function ($) {
                $.fn.jdMarquee = function (option, callback) {
                    if (typeof option == "function") {
                        callback = option;
                        option = {};
                    }
                    ;
                    var s = $.extend({
                        deriction: "up",
                        speed: 10,
                        auto: false,
                        width: null,
                        height: null,
                        step: 1,
                        control: false,
                        _front: null,
                        _back: null,
                        _stop: null,
                        _continue: null,
                        wrapstyle: "",
                        stay: 5000,
                        delay: 20,
                        dom: "div>ul>li".split(">"),
                        mainTimer: null,
                        subTimer: null,
                        tag: false,
                        convert: false,
                        btn: null,
                        disabled: "disabled",
                        pos: {ojbect: null, clone: null}
                    }, option || {});
                    var object = this.find(s.dom[1]);
                    var subObject = this.find(s.dom[2]);
                    var clone;
                    if (s.deriction == "up" || s.deriction == "down") {
                        var height = object.eq(0).outerHeight();
                        var step = s.step * subObject.eq(0).outerHeight();
                        object.css({width: s.width + "px", overflow: "hidden"});
                    }
                    ;
                    if (s.deriction == "left" || s.deriction == "right") {
                        var width = subObject.length * subObject.eq(0).outerWidth();
                        object.css({width: width + "px", overflow: "hidden"});
                        var step = s.step * subObject.eq(0).outerWidth();
                    }
                    ;
                    var init = function () {
                        var wrap = "<div style='position:relative;overflow:hidden;z-index:1;width:" + s.width + "px;height:" + s.height + "px;" + s.wrapstyle + "'></div>";
                        object.css({position: "absolute", left: 0, top: 0}).wrap(wrap);
                        s.pos.object = 0;
                        clone = object.clone();
                        object.after(clone);
                        switch (s.deriction) {
                            default:
                            case "up":
                                object.css({marginLeft: 0, marginTop: 0});
                                clone.css({marginLeft: 0, marginTop: height + "px"});
                                s.pos.clone = height;
                                break;
                            case "down":
                                object.css({marginLeft: 0, marginTop: 0});
                                clone.css({marginLeft: 0, marginTop: -height + "px"});
                                s.pos.clone = -height;
                                break;
                            case "left":
                                object.css({marginTop: 0, marginLeft: 0});
                                clone.css({marginTop: 0, marginLeft: width + "px"});
                                s.pos.clone = width;
                                break;
                            case "right":
                                object.css({marginTop: 0, marginLeft: 0});
                                clone.css({marginTop: 0, marginLeft: -width + "px"});
                                s.pos.clone = -width;
                                break;
                        }
                        ;
                        if (s.auto) {
                            initMainTimer();
                            object.hover(function () {
                                clear(s.mainTimer);
                            }, function () {
                                initMainTimer();
                            });
                            clone.hover(function () {
                                clear(s.mainTimer);
                            }, function () {
                                initMainTimer();
                            });
                        }
                        ;
                        if (callback) {
                            callback();
                        }
                        ;
                        if (s.control) {
                            initControls();
                        }
                    };
                    var initMainTimer = function (delay) {
                        clear(s.mainTimer);
                        s.stay = delay ? delay : s.stay;
                        s.mainTimer = setInterval(function () {
                            initSubTimer()
                        }, s.stay);
                    };
                    var initSubTimer = function () {
                        clear(s.subTimer);
                        s.subTimer = setInterval(function () {
                            roll()
                        }, s.delay);
                    };
                    var clear = function (timer) {
                        if (timer != null) {
                            clearInterval(timer);
                        }
                    };
                    var disControl = function (A) {
                        if (A) {
                            $(s._front).unbind("click");
                            $(s._back).unbind("click");
                            $(s._stop).unbind("click");
                            $(s._continue).unbind("click");
                        } else {
                            initControls();
                        }
                    };
                    var initControls = function () {
                        if (s._front != null) {
                            $(s._front).click(function () {
                                $(s._front).addClass(s.disabled);
                                disControl(true);
                                clear(s.mainTimer);
                                s.convert = true;
                                s.btn = "front";
                                if (!s.auto) {
                                    s.tag = true;
                                }
                                ;
                                convert();
                            });
                        }
                        ;
                        if (s._back != null) {
                            $(s._back).click(function () {
                                $(s._back).addClass(s.disabled);
                                disControl(true);
                                clear(s.mainTimer);
                                s.convert = true;
                                s.btn = "back";
                                if (!s.auto) {
                                    s.tag = true;
                                }
                                ;
                                convert();
                            });
                        }
                        ;
                        if (s._stop != null) {
                            $(s._stop).click(function () {
                                clear(s.mainTimer);
                            });
                        }
                        ;
                        if (s._continue != null) {
                            $(s._continue).click(function () {
                                initMainTimer();
                            });
                        }
                    };
                    var convert = function () {
                        if (s.tag && s.convert) {
                            s.convert = false;
                            if (s.btn == "front") {
                                if (s.deriction == "down") {
                                    s.deriction = "up";
                                }
                                ;
                                if (s.deriction == "right") {
                                    s.deriction = "left";
                                }
                            }
                            ;
                            if (s.btn == "back") {
                                if (s.deriction == "up") {
                                    s.deriction = "down";
                                }
                                ;
                                if (s.deriction == "left") {
                                    s.deriction = "right";
                                }
                            }
                            ;
                            if (s.auto) {
                                initMainTimer();
                            } else {
                                initMainTimer(4 * s.delay);
                            }
                        }
                    };
                    var setPos = function (y1, y2, x) {
                        if (x) {
                            clear(s.subTimer);
                            s.pos.object = y1;
                            s.pos.clone = y2;
                            s.tag = true;
                        } else {
                            s.tag = false;
                        }
                        ;
                        if (s.tag) {
                            if (s.convert) {
                                convert();
                            } else {
                                if (!s.auto) {
                                    clear(s.mainTimer);
                                }
                            }
                        }
                        ;
                        if (s.deriction == "up" || s.deriction == "down") {
                            object.css({marginTop: y1 + "px"});
                            clone.css({marginTop: y2 + "px"});
                        }
                        ;
                        if (s.deriction == "left" || s.deriction == "right") {
                            object.css({marginLeft: y1 + "px"});
                            clone.css({marginLeft: y2 + "px"});
                        }
                    };
                    var roll = function () {
                        var y_object = (s.deriction == "up" || s.deriction == "down") ? parseInt(object.get(0).style.marginTop) : parseInt(object.get(0).style.marginLeft);
                        var y_clone = (s.deriction == "up" || s.deriction == "down") ? parseInt(clone.get(0).style.marginTop) : parseInt(clone.get(0).style.marginLeft);
                        var y_add = Math.max(Math.abs(y_object - s.pos.object), Math.abs(y_clone - s.pos.clone));
                        var y_ceil = Math.ceil((step - y_add) / s.speed);
                        switch (s.deriction) {
                            case "up":
                                if (y_add == step) {
                                    setPos(y_object, y_clone, true);
                                    $(s._front).removeClass(s.disabled);
                                    disControl(false);
                                } else {
                                    if (y_object <= -height) {
                                        y_object = y_clone + height;
                                        s.pos.object = y_object;
                                    }
                                    ;
                                    if (y_clone <= -height) {
                                        y_clone = y_object + height;
                                        s.pos.clone = y_clone;
                                    }
                                    ;
                                    setPos((y_object - y_ceil), (y_clone - y_ceil));
                                }
                                ;
                                break;
                            case "down":
                                if (y_add == step) {
                                    setPos(y_object, y_clone, true);
                                    $(s._back).removeClass(s.disabled);
                                    disControl(false);
                                } else {
                                    if (y_object >= height) {
                                        y_object = y_clone - height;
                                        s.pos.object = y_object;
                                    }
                                    ;
                                    if (y_clone >= height) {
                                        y_clone = y_object - height;
                                        s.pos.clone = y_clone;
                                    }
                                    ;
                                    setPos((y_object + y_ceil), (y_clone + y_ceil));
                                }
                                ;
                                break;
                            case "left":
                                if (y_add == step) {
                                    setPos(y_object, y_clone, true);
                                    $(s._front).removeClass(s.disabled);
                                    disControl(false);
                                } else {
                                    if (y_object <= -width) {
                                        y_object = y_clone + width;
                                        s.pos.object = y_object;
                                    }
                                    ;
                                    if (y_clone <= -width) {
                                        y_clone = y_object + width;
                                        s.pos.clone = y_clone;
                                    }
                                    ;
                                    setPos((y_object - y_ceil), (y_clone - y_ceil));
                                }
                                ;
                                break;
                            case "right":
                                if (y_add == step) {
                                    setPos(y_object, y_clone, true);
                                    $(s._back).removeClass(s.disabled);
                                    disControl(false);
                                } else {
                                    if (y_object >= width) {
                                        y_object = y_clone - width;
                                        s.pos.object = y_object;
                                    }
                                    ;
                                    if (y_clone >= width) {
                                        y_clone = y_object - width;
                                        s.pos.clone = y_clone;
                                    }
                                    ;
                                    setPos((y_object + y_ceil), (y_clone + y_ceil));
                                }
                                ;
                                break;
                        }
                    };
                    if (s.deriction == "up" || s.deriction == "down") {
                        if (height >= s.height && height >= s.step) {
                            init();
                        }
                    }
                    ;
                    if (s.deriction == "left" || s.deriction == "right") {
                        if (width >= s.width && width >= s.step) {
                            init();
                        }
                    }
                }
            })(jQuery);

            $(function () {
                $(".jqzoom").jqueryzoom({
                    xzoom: 420,
                    yzoom: 420,
                    offset: 10,
                    position: "right",
                    preload: 1,
                    lens: 1
                });

                $("#spec-list").jdMarquee({
                    deriction: "left",
                    width: 390,
                    height: 68,
                    step: 1,
                    speed: 4,
                    delay: 5,
                    control: true,
                    _front: "#spec-right",
                    _back: "#spec-left"
                });

                $(".shareDiv").mouseover(function () {
                    $(".snsShare", this).addClass("moveIn");
                    $(".snsBox").show();
                })
                $(".shareDiv").mouseout(function () {
                    $(".snsShare", this).removeClass("moveIn");
                    $(".snsBox").hide();
                })
                $(".shareDiv2").mouseover(function () {
                    $(".WeChat", this).addClass("moveIn");
                    $(".WeChatBox").show();
                })
                $(".shareDiv2").mouseout(function () {
                    $(".WeChat", this).removeClass("moveIn");
                    $(".WeChatBox").hide();
                });
                $(".sortList li").click(function () {
                    $(this).addClass("on nav-bg-color-s nav-f-color-s").siblings().removeClass("on nav-bg-color-s nav-f-color-s");
                });
                var nav = $("#detailBom");
                var headHeight = $(".detailInfo").position().top;
                var ie6 = !-[1,] && !window.XMLHttpRequest;
                $(function () {
                    if (!ie6) {
                        $(window).scroll(function () {
                            scroll();
                        });
                    }
                    scroll();
                });
                function scroll() {
                    var sh = $(document).scrollTop();
                    if (sh > headHeight) {
                        nav.addClass("navFix2");
                        //$(".navFix2").css("left",leftNum);
                    } else {
                        nav.removeClass("navFix2");
                    }
                }

                $(".moblieDiv").mouseover(function () {
                    var src = $('#productQRCode').attr('src');
                    if (src == '') {
                        $('#productQRCode').attr('src', '__STATIC__/images/qrcode_vmall_app01.png');
                    }
                    $(".qrCode", this).show();
                    $(".moblie", this).addClass("moveIn");
                })

                $(".moblieDiv").mouseout(function () {
                    $(".qrCode", this).hide();
                    $(".moblie", this).removeClass("moveIn");
                })
                $(".detailNavAddCart").mouseover(function () {
                    $(".buyBom", this).show();
                    $(".buyTop", this).addClass("moveIn");
                })
                $(".detailNavAddCart").mouseout(function () {
                    $(".buyBom", this).hide();
                    $(".buyTop", this).removeClass("moveIn");
                })
            })

            function showImg(obj, img_big, img_src) {
                $("#spec-n1 img").attr('src', img_big);
                $("#spec-n1 img").attr('jqimg', img_src);
            }

            function showPro(id) {
                $("div[id^='pro_div_']").hide();
                if (id == 1) {
                    $("#pro_div_2, #pro_div_3").show();
                }
                $('#pro_div_' + id).show();

            }

        </script>

        <script src="__STATIC__/js/jqueyr.scroll.js"></script>
        <script src="__STATIC__/js/select2.js"></script>
        <link rel="stylesheet" href="css/select4.css" type="text/css"/>
        <script type="text/javascript">
            function selectOnchange(element) {
                $("span[pid^='replceA']").html("<a href=\"/shop/" + $(element).find('option:selected').val() + ".html\" target='_blank'>查看地图</a>");
            }
            $(function () {
                SetAllSelects2.setAllSelectStyle2("shopID");
            });
        </script>
        <script src="__STATIC__/js/zepto.min.js"></script>
        <script type="text/javascript">window.jQuery = window.Zepto;</script>
        <script>
            $(function () {
                window._bd_share_config = {
                    "common": {
                        "bdSnsKey": {},
                        "bdPic": "__STATIC__/images/newLogo.png",
                        "bdUrl": "{:U('Home/Goods/goodsInfo',array('id'=>$goods['goods_id']))}",
                        "bdText": "{$goods.goods_name}",
                        "bdDesc": "{$goods.goods_name}",
                        "bdMini": "2",
                        "bdPic": "",
                        "bdStyle": "0",
                        "bdSize": "16"
                    },
                    "share": {},
                    "selectShare": {
                        "bdContainerClass": null,
                        "bdSelectMiniList": ["qzone", "tsina", "tqq", "renren", "weixin"]
                    }
                };
                with (document)0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];
            })
        </script>
        <style>
            #lc_58327 .container {
                width: 1200px;
                margin: 0 auto;
                padding: 20px 0;
            }

            #lc_58327 .floor-footer {
                width: 100%;
                background: #fff;
                margin-top: 20px;
            }

            #lc_58327 .clear {
                clear: both
            }

            #lc_58327 .footer-dl {
                width: 199px;
                float: left;
            }

            #lc_58327 .footer-dl dt {
                padding: 6px 0;
                font: 400 16px/24px "microsoft yahei";
            }

            #lc_58327 .footer-dl dd {
                width: 80%;
                height: 20px;
                overflow: hidden;
            }

            #lc_58327 .ewb-box {
                width: 300px;
            }

            #lc_58327 .ewb-box li {
                width: 50%;
                text-align: center;
                font-size: 14px;
            }

            #lc_58327 .ewb-box li p {
                padding-top: 10px;
            }

            .footer-left {
                width: 900px;
            }
        </style>
    </div>
    <div class="clear"></div>


<span style="display:none;" id="hiddenSpan"></span>
<div style="display:none">
    <script>
        var _hmt = _hmt || [];
        (function () {
            var hm = document.createElement("script");
            hm.src = "//hm.baidu.com/hm.js?b0fac3dca9add6c42241bb8d98bdf1de";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</div>
<include file="Public/footer"/>
<script type="text/javascript" src="__STATIC__/js/header_base.js"></script>
<script type="text/javascript">
    // 验证码切换
    function verify(){
        $('#verify_code').attr('src','/index.php?m=Home&c=Index&a=verify&type=consult&fontSize=20&length=4&r='+Math.random());
    }

    // 商品咨询表单验证
    function check_form_consult(f){
        if($.trim($('input[name="username"]').val()).length == 0)
        {
            layer.msg('请填写一个网名', {
                icon: 1,   // 成功图标
                time: 2000 //2秒关闭（如果不配置，默认是3秒）
            });

            return false;
        }
        if($.trim($('textarea[name="content"]').val()).length == 0)
        {

            layer.msg('请填输入咨询内容', {
                icon: 1,   // 成功图标
                time: 2000 //2秒关闭（如果不配置，默认是3秒）
            });
            return false;
        }
        if($.trim($('input[name="verify_code"]').val()).length == 0)
        {
            layer.msg('请填输入验证码', {
                icon: 1,   // 成功图标
                time: 2000 //2秒关闭（如果不配置，默认是3秒）
            });
            return false;
        }
        return true;
    }

    window.onload = function () {
        //setMaxImgHeight();
        getAllOnloadScript();
    }

    function getAllOnloadScript() {
        var allOnloadScripts = document.getElementsByName('onloadScript');
        var allScript = "";
        for (var i = 0; i < allOnloadScripts.length; ++i) {
            allScript += (allOnloadScripts[i].value + ";");
        }
        eval(allScript);
    }
    $(function () {
        bindHideErrorMsgEvent();

    });

    $('#collectLink').click(function(){
        if(getCookie('user_id') == ''){
            layer.open({
                type: 2,
                title: '<b>登陆开太鱼文化网</b>',
                skin: 'layui-layer-rim',
                shadeClose: true,
                shade: 0.5,
                area: ['490px', '460px'],
                content: "{:U('Home/User/pop_login')}",
            });
        }else{
            $.ajax({
                type:'post',
                dataType:'json',
                data:{goods_id:$('input[name="goods_id"]').val()},
                url:"{:U('Home/Goods/collect_goods')}",
                success:function(res){
                    if(res.status == 1){
                        layer.msg('成功添加至收藏夹', {icon: 1});
                    }else{
                        layer.msg(res.msg, {icon: 3});
                    }
                }
            });
        }
    })
</script>
</body>
</html>

